/* 
循环数组，给数组每一项都新增字段
*/
const arr = [
  { name: "张三", age: "13" },
  { name: "李四", age: "14" },
];
const mapArr = arr.map((v) =>
  Object.assign({}, v, { checked: false, isPerson: true })
);
console.log("mapArr", mapArr);
// [
//   { name: '张三', age: '13', checked: false , isPerson:true },
//   { name: '李四', age: '14', checked: false , isPerson:true }
// ]
